package com.lijing.avlTree;

/**
 * @Description TODO
 * @title: AvlTreeDemo
 * @Author LiJing
 * @Date: 2021/3/3012:25 上午
 * @Version 1.0
 */
public class AvlTreeDemo {
    public static void main(String[] args) {
        int[] arr = {11,10,8,9,6,7};
        AvlTree avlTree = new AvlTree();
        for (int i = 0; i < arr.length; i++) {
            avlTree.add(new Node(arr[i]));
        }
        avlTree.infixOrder();
        System.out.println(avlTree.getRoot().getLeft().height());
        System.out.println(avlTree.getRoot().getRight().height());
        System.out.println(avlTree.getRoot().getValue());

    }
}
